<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>后台管理系统 - 控制台</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://cdn.bootcdn.net/ajax/libs/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <style>
        .sidebar {
            background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
        }
        .content-area {
            background: #f8fafc;
        }
        .stat-card {
            background: white;
            border-left: 4px solid #667eea;
        }
    </style>
</head>
<body class="bg-gray-100">
    <div class="flex h-screen">
        <!-- 侧边栏 -->
        <div class="sidebar w-64 text-white">
            <div class="p-6">
                <div class="flex items-center mb-8">
                    <div class="w-10 h-10 bg-white bg-opacity-20 rounded-full flex items-center justify-center mr-3">
                        <i class="fas fa-shield-alt"></i>
                    </div>
                    <div>
                        <h2 class="text-lg font-semibold">管理后台</h2>
                        <p class="text-sm opacity-75" id="currentUserRole">管理员</p>
                    </div>
                </div>
                
                <nav class="space-y-2">
                    <a href="#" class="flex items-center px-4 py-3 bg-white bg-opacity-20 rounded-lg">
                        <i class="fas fa-tachometer-alt mr-3"></i>
                        控制台
                    </a>
                    <a href="#" class="flex items-center px-4 py-3 hover:bg-white hover:bg-opacity-10 rounded-lg transition">
                        <i class="fas fa-users mr-3"></i>
                        用户管理
                    </a>
                    <a href="#" class="flex items-center px-4 py-3 hover:bg-white hover:bg-opacity-10 rounded-lg transition">
                        <i class="fas fa-cog mr-3"></i>
                        系统设置
                    </a>
                    <a href="#" class="flex items-center px-4 py-3 hover:bg-white hover:bg-opacity-10 rounded-lg transition">
                        <i class="fas fa-chart-bar mr-3"></i>
                        数据统计
                    </a>
                </nav>
            </div>
            
            <div class="absolute bottom-0 w-64 p-6">
                <button id="logoutBtn" class="w-full flex items-center justify-center px-4 py-3 bg-red-500 bg-opacity-20 hover:bg-opacity-30 rounded-lg transition">
                    <i class="fas fa-sign-out-alt mr-2"></i>
                    退出登录
                </button>
            </div>
        </div>

        <!-- 主内容区 -->
        <div class="flex-1 flex flex-col">
            <!-- 顶部导航 -->
            <header class="bg-white shadow-sm border-b">
                <div class="flex items-center justify-between px-8 py-4">
                    <h1 class="text-2xl font-semibold text-gray-800">控制台</h1>
                    <div class="flex items-center space-x-4">
                        <span class="text-gray-600" id="currentUserName">欢迎，管理员</span>
                        <div class="w-8 h-8 bg-gray-300 rounded-full flex items-center justify-center">
                            <i class="fas fa-user text-gray-600"></i>
                        </div>
                    </div>
                </div>
            </header>

            <!-- 内容区域 -->
            <main class="flex-1 p-8 overflow-y-auto content-area">
                <!-- 统计卡片 -->
                <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8">
                    <div class="stat-card p-6 rounded-lg shadow">
                        <div class="flex items-center">
                            <div class="p-3 rounded-full bg-blue-100 text-blue-600">
                                <i class="fas fa-users text-xl"></i>
                            </div>
                            <div class="ml-4">
                                <p class="text-sm font-medium text-gray-600">总用户数</p>
                                <p class="text-2xl font-semibold text-gray-900">1,234</p>
                            </div>
                        </div>
                    </div>

                    <div class="stat-card p-6 rounded-lg shadow">
                        <div class="flex items-center">
                            <div class="p-3 rounded-full bg-green-100 text-green-600">
                                <i class="fas fa-user-check text-xl"></i>
                            </div>
                            <div class="ml-4">
                                <p class="text-sm font-medium text-gray-600">在线用户</p>
                                <p class="text-2xl font-semibold text-gray-900">89</p>
                            </div>
                        </div>
                    </div>

                    <div class="stat-card p-6 rounded-lg shadow">
                        <div class="flex items-center">
                            <div class="p-3 rounded-full bg-yellow-100 text-yellow-600">
                                <i class="fas fa-clock text-xl"></i>
                            </div>
                            <div class="ml-4">
                                <p class="text-sm font-medium text-gray-600">今日访问</p>
                                <p class="text-2xl font-semibold text-gray-900">456</p>
                            </div>
                        </div>
                    </div>

                    <div class="stat-card p-6 rounded-lg shadow">
                        <div class="flex items-center">
                            <div class="p-3 rounded-full bg-purple-100 text-purple-600">
                                <i class="fas fa-chart-line text-xl"></i>
                            </div>
                            <div class="ml-4">
                                <p class="text-sm font-medium text-gray-600">系统状态</p>
                                <p class="text-2xl font-semibold text-gray-900">正常</p>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 最近活动 -->
                <div class="bg-white rounded-lg shadow">
                    <div class="px-6 py-4 border-b">
                        <h3 class="text-lg font-semibold text-gray-800">最近活动</h3>
                    </div>
                    <div class="p-6">
                        <div class="space-y-4">
                            <div class="flex items-center">
                                <div class="w-2 h-2 bg-green-400 rounded-full mr-3"></div>
                                <div class="flex-1">
                                    <p class="text-sm text-gray-800">管理员登录系统</p>
                                    <p class="text-xs text-gray-500">2分钟前</p>
                                </div>
                            </div>
                            <div class="flex items-center">
                                <div class="w-2 h-2 bg-blue-400 rounded-full mr-3"></div>
                                <div class="flex-1">
                                    <p class="text-sm text-gray-800">新用户注册：张三</p>
                                    <p class="text-xs text-gray-500">15分钟前</p>
                                </div>
                            </div>
                            <div class="flex items-center">
                                <div class="w-2 h-2 bg-yellow-400 rounded-full mr-3"></div>
                                <div class="flex-1">
                                    <p class="text-sm text-gray-800">系统更新完成</p>
                                    <p class="text-xs text-gray-500">1小时前</p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </main>
        </div>
    </div>

    <script src="public/js/dashboard.js"></script>
</body>
</html>
